package org.example.model.SafetyHandler;

import org.example.other.SafetyEvent;
import org.example.other.EventType;
public class ObstacleHandler extends SafetyHandler {
    public void handle(SafetyEvent event) {
        if (event.getType() == EventType.OBSTACLE) {
            System.out.println(">>> 安全处理: 检测到障碍物，执行紧急制动");
        } else if (next != null) {
            next.handle(event);
        }
    }
}